<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="strutsTags"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<head>
	<base href="<%=basePath%>">
	<link href="<s:url value="/resource/css/style.css"/>" rel="stylesheet"
		type="text/css" />
</head>
<title>薪资帐套配置</title>
<body onload="HRMCommon.check_order();">
	<s:component template="bodyhead">
		<s:param name="pagetitle" value="'薪资帐套配置'" />
	</s:component>
	<s:form id="searchesa" name="searchesa" action="searchesa"
		namespace="/compensation" method="POST">
		<s:hidden id="order" name="page.order" />
		<s:hidden id="operate" name="page.operate" />
		<s:hidden id="page.currentPage" name="page.currentPage" />
		<table width="100%" class="formtable">
			<tr>
				<td>
					<table width="100%">
						<tr>
							<s:textfield label="帐套名称" id="txtEsdName" name="esacName"
								size="26" maxlength="64" />
							<td>
								显示所有版本&nbsp;
								<input type="checkbox" id="versionFlag" name="versionFlag"
									<s:if test="versionFlag!=null">checked</s:if> class="checkbox"
									value="view" />
							</td>
						</tr>
					</table>
				</td>
				<td>
					<input title="[Alt+F]" accesskey="F" id="submit_button"
						class="button" type="button" onclick="submitSearch();" value="查询">
					<input title="[Alt+C]" accesskey="C" class="button" type="button"
						value="重置" onClick="window.location='searchesa.action';">
				</td>
			</tr>
		</table>

		<!-- 操作 -->
		<div class="operatediv">
			<input type="hidden" name="searchOrExport" id="searchOrExport" />
			<s:hidden id="output-ommId" name="outmatchModelId" />
			<s:hidden id="output-ioName" name="outputIoName" />
			<span class="operatedivleft"> <input class="button"
					type="button" onClick="window.location='addesa.action';"
					value="新建帐套" /> <input class="button" type="button" value="导入帐套"
					id="btnInput" onclick="initDivImmUpload('ISalaryAcc','')" /> <input
					class="button" type="button" value="导出帐套" id="btnOutput"
					onclick="submitExport();" /> </span>
			<span class="operatedivright">本次查询共得到<s:property
					value="page.totalRows" />条薪资帐套记录</span>
		</div>

		<!--acctItemDef  -->
		<table id="empsalaryaccttable" cellpadding="0" cellspacing="0"
			width="100%" border="0" class="gridtableList">
			<tr>
				<th>
					<a href="#"
						onclick="HRMCommon.order_submit('esavEsac.esacName','searchesa');">帐套名称</a>
					<img src='resource/images/arrow_.gif' width='8' height='10'
						id='esavEsac.esacName_img'>
				</th>
				<th>
					<a href="#"
						onclick="HRMCommon.order_submit('esavEsac.esacDesc','searchesa');">帐套描述</a>
					<img src='resource/images/arrow_.gif' width='8' height='10'
						id='esavEsac.esacDesc_img'>
				</th>
				<th>
					<a href="#"
						onclick="HRMCommon.order_submit('esavValidFrom','searchesa');">启用时间</a>
					<img src='resource/images/arrow_.gif' width='8' height='10'
						id='esavValidFrom_img'>
				</th>
				<th>
					<a href="#"
						onclick="HRMCommon.order_submit('esavValidTo','searchesa');">停用时间</a>
					<img src='resource/images/arrow_.gif' width='8' height='10'
						id='esavValidTo_img'>
				</th>
				<th>
					<a href="#"
						onclick="HRMCommon.order_submit('esavCreateTime','searchesa');">创建时间</a>
					<img src='resource/images/arrow_.gif' width='8' height='10'
						id='esavCreateTime_img'>
				</th>
				<th>
					<a href="#"
						onclick="HRMCommon.order_submit('esavLastChangeBy','searchesa');">最后修改时间</a>
					<img src='resource/images/arrow_.gif' width='8' height='10'
						id='esavLastChangeBy_img'>
				</th>
				<th>
					操作
				</th>
			</tr>
			<s:if test="!empsalaryacctversionList.isEmpty()">
				<s:iterator value="empsalaryacctversionList" status="index">
					<tr align="center">
						<td align="left">
							<s:property value="esavEsac.esacName" />
						</td>
						<td align="left">
							<s:property value="esavEsac.esacDesc" />
						</td>
						<td nowrap="nowrap">
							<s:property value="esavValidFrom" />
						</td>
						<td nowrap="nowrap">
							<s:property value="esavValidTo" />
						</td>
						<td>
							<s:date name="esavCreateTime" format="yyyy-MM-dd HH:mm" />
						</td>
						<td>
							<s:date name="esavLastChangeTime" format="yyyy-MM-dd HH:mm" />
						</td>
						<td>
							<s:if test="esavValidTo==null">
								<img
									onclick="window.location='updateesainit.action?id=<s:property value="id"/>'"
									alt="修改帐套" title="修改帐套" class="urlimg"
									src="resource/images/edit.gif" />
								<img
									onclick="window.location='copyAcct.action?id=<s:property value="id"/>&flag=copy'"
									alt="复制帐套" title="复制帐套" class="urlimg"
									src="resource/images/ProjectCopy.gif" />
								<img onclick="delesa('<s:property value="id" />')" alt="删除帐套"
									title="删除帐套" class="urlimg" src="resource/images/delete.gif" />
							</s:if>
							<s:else>
								<img
									onclick="window.location='updateesainit.action?id=<s:property value="id"/>'"
									alt="查看帐套" title="查看帐套" class="urlimg"
									src="resource/images/Search.gif" />
								<img
									onclick="window.location='copyAcct.action?id=<s:property value="id"/>&flag=copy'"
									alt="复制帐套" title="复制帐套" class="urlimg"
									src="resource/images/ProjectCopy.gif" />
							</s:else>
						</td>
					</tr>
				</s:iterator>
			</s:if>
			<s:else>
				<tr>
					<td align="center" colspan="11">
						无帐套存在！
					</td>
				</tr>
			</s:else>
		</table>
		<!-- 分页 -->
		<s:pager end="page.end" pageNo="page.currentPage"
			totalRows="page.totalRows" totalPages="page.totalPages"
			formId="searchesa" start="page.start" />

	</s:form>
	<SCRIPT LANGUAGE="JavaScript">
	function submitSearch() {
		document.getElementById("searchOrExport").value = "";
		document.forms[0].submit();
	}

	function submitExport() {
		document.getElementById("searchOrExport").value = "export";
		document.forms[0].submit();
	}

	function delesa(id) {
		if (confirm("删除帐套最新版本可能会影响到员工现有薪资配置，您确定要删除吗？")) {
			window.location = "delesa.action?id=" + id;
		}
	}
</SCRIPT>
	<jsp:include flush="true" page="../io/div_omm_select.jsp"></jsp:include>
	<jsp:include flush="true" page="../io/div_upload.jsp"></jsp:include>
</body>
